<template>
	<view>
		<uni-swiper-dot :info="goodsList" :current="current" field="content" :mode="mode">
		    <swiper class="swiper-box" @change="change">
		        <swiper-item v-for="(item ,index) in goodsList" :key="index">
		            <view class="swiper-item">
		                {{item.content}}
						<image style="width: 100%;height: 100%;" :src="item.src"></image>
		            </view>
		        </swiper-item>
		    </swiper>
		</uni-swiper-dot>
	</view>
</template>

<script>
	import { uniSwiperDot } from '@dcloudio/uni-ui';
	export default {
		components: {
			uniSwiperDot
		},
		name:"custGoodsSwiperDot",
		data() {
			return {
				goodsList: [{
					content: '内容 A',
					src: '../../static/temp/banner1.jpg'
				}, {
					content: '内容 B',
					src: '../../static/temp/banner2.jpg'
				}, {
					content: '内容 C',
					src: '../../static/temp/banner3.jpg'
				}],
				current: 0,
				mode: 'round'
			};
		},
		methods:{
			change(e) {
				this.current = e.detail.current;
			}
		}
	}
</script>

<style>

</style>
